Skip to content

Instantly share code, notes, and snippets.

@paulirish
paulirish / what-forces-layout.md
Last active May 9, 2024 07:00
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@juanbrujo
juanbrujo / PlayStationBIOSFilesNAEUJP.md
Last active May 9, 2024 06:57
Files for PlayStation BIOS Files NA-EU-JP
@kirbah
kirbah / dual-boot-windows-and-ubuntu-with-luks-tpm2-encryption.md
Last active May 9, 2024 06:56
Dual booting Windows 11 and Ubuntu 22.04 LTS with LUKS and TPM2 encryption

Dual booting Windows 11 and Ubuntu 22.04 LTS with LUKS and TPM2 encryption

Make sure to think about data backup before you proceed with the below guide.

Tested on HP Elitebook 840 G6 in April 2024.

Bootable USB disk preparation

There are various options for creating a bootable USB drive.

@martinbutt
martinbutt / INSTALL.md
Created March 27, 2022 20:32
Install Express VPN on ARM64 Gemini PDA Debian 9 (Gemian Linux)

Configure system to allow installation of armhf (32-bit) packages

sudo dpkg --add-architecture armhf
sudo apt-get update

Change [arch=arm64] to [arch=arm64,armhf] in all locations

sudo vi /etc/apt/sources.list.d/multistrap-debian.list

Install the cross compatibility libraries

@joe-ervin05
joe-ervin05 / validateVideoLinks.ts
Last active May 9, 2024 06:51
Helper functions that validate any youtube or vimeo url and return data about the video at the url.
@XieJiSS
XieJiSS / userscript.js
Last active May 9, 2024 06:48
CC98 remove watermark tampermonkey userscript
// ==UserScript==
// @name No Watermark CC98
// @namespace http://tampermonkey.net/
// @version 1.1
// @description Remove CC98 watermark
// @author who cares?
// @license WTFPL
// @run-at document-start
// @match https://www.cc98.org/*
// @icon https://www.cc98.org/static/98icon.ico
@Qubadi
Qubadi / gist:539d5682527ca4c13efd85e9ca670b7f
Created February 14, 2024 10:08
JetFormBuilder change display message to Popup
<style>
/* Overlay Styling */
#overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
@parmentf
parmentf / GitCommitEmoji.md
Last active May 9, 2024 06:47
Git Commit message Emoji
让两个子网内的设备可以互通访问
@wojteklu
wojteklu / clean_code.md
Last active May 9, 2024 06:46
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules